package model;

import java.util.*;

public enum RenterStatus
{
	UNDEFINED(0,"undefined"),
	WAITING (1,"Waiting"),
	ACTIVE(2, "Active"),
	MOVEDOUT(3, "Moved out");
	
	/* FIELDS */
	private final int index;
	private final String value;
	private static final Map<Integer,RenterStatus> lookup = new HashMap<Integer,RenterStatus>();
	
	/* CONSTRUCTORS */
	private RenterStatus(int index, String value) 
	{
        this.index = index;
        this.value = value;
    }
	static 
	{
	    for(RenterStatus ct : EnumSet.allOf(RenterStatus.class))
	         lookup.put(ct.getIndex(), ct);
	}
	/* ACCESSORS */
	public int getIndex()
	{
		return this.index;
	}
	public String getValue()
	{
		return this.value;
	}
	public static RenterStatus getStatus(int index) { 
        return lookup.get(index); 
   }

}